


//
//  DEFINE.h
//  nncloud
//
//  Created by macfai on 2018/9/17.
//  Copyright © 2018年 youedata. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#ifndef DEFINE_h
#define DEFINE_h

//编写留言
typedef NS_ENUM(NSInteger, kCommitType) {
    kCommitWriteMsg = 0,  //编写留言
    kCommitAutoReply,     // 自行答复
};

//创新创业相关公用页面跳转
typedef NS_ENUM(NSInteger,InovationType) {
    
    kWisdomMerchant = 0,          //智慧招商
    kInovationAndBusiness,     //创新创业
    kIntellectualPropertyRight,  //知识产权
    kProjectShenbao,            //项目申报
    kTrainingService,          //培训服务
    kCollectMoneyService,      //融资服务
    kProjectRoadShow,         //项目路演
};



#ifdef DEBUG
# define YYLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
# define YYLog(...)
#endif

//122 = 44+44+34   下面的宏的括号不能少  宏括号  调整不同的尺寸下的屏幕高度适配问题
#define ScreenHeightFlex (ScreenHeight>736?122:64)
#define ScreenHeight [UIScreen mainScreen].bounds.size.height
#define ScreenWidth  [UIScreen mainScreen].bounds.size.width
#define kNavHeight 64
#define kTabHeight 49
#define kpopViewHeight 345

#define IOS7 [[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0
#define iOS8OrLater ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f)
#define iOS9OrLater ([UIDevice currentDevice].systemVersion.floatValue >= 9.0f)
#define iOS10OrLater ([UIDevice currentDevice].systemVersion.floatValue >= 10.0f)

////整体用的底色  特别浅的灰色
#define kBackgroundColor [UIColor colorWithRed:242.f/255.f green:242.f/255.f blue:242.f/255.f alpha:1]


#define kNavigationBarGrayColor WDColorFrom16RGB(0xF9F8F8)
#define kNavigationTitleColor kBlackColor

//应用的名称
#define app_Name [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"]


//获取rgb颜色
#define NColorRGB(a,b,c) [UIColor colorWithRed:a/255.0 green:b/255.0 blue:c/255.0 alpha:1.0]
//获取16进制颜色
#define NColorFrom16RGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
//0x5da7ff

///16进制转换
#define NNColorHex(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
///section 高度相关
#define SectionHeaderHeight  10.f

#define ThemeBlue NColorFrom16RGB(0x23b7e5)

//直接根据图片名称获取图片
#define WDImgName(name) [UIImage imageNamed:name]
#define NNImgName(name) [UIImage imageNamed:name]


#define kBlackColor      ([UIColor blackColor])
#define kLightGrayColor  [UIColor lightGrayColor]
#define kGrayColor  [UIColor grayColor]
#define kDarkGrayColor [UIColor darkGrayColor]

#define kMagentaColor   [UIColor magentaColor]
#define kWhiteColor  [UIColor whiteColor]
#define kClearColor  [UIColor clearColor]
#define kCyanColor  [UIColor cyanColor]
#define kFont8 [UIFont systemFontOfSize:8]
#define kFont9 [UIFont systemFontOfSize:9]
#define kFont10 [UIFont systemFontOfSize:10]
#define kFont12 [UIFont systemFontOfSize:12]
#define kFont13 [UIFont systemFontOfSize:13]
#define kFont14 [UIFont systemFontOfSize:14]
#define kFont15 [UIFont systemFontOfSize:15]
#define kFont16 [UIFont systemFontOfSize:16]
#define kFont18 [UIFont systemFontOfSize:18]
#define kBoldFont [UIFont boldSystemFontOfSize:15]

//block 循环引用避免
#define WeakStament(wself) __weak typeof(self) wself=self


//去除"-(id)performSelector:(SEL)aSelector withObject:(id)object;"的警告
#define SuppressPerformSelectorLeakWarning(Stuff) /do { /_Pragma("clang diagnostic push") /_Pragma("clang diagnostic ignored /"-Warc-performSelector-leaks/"") /Stuff; /_Pragma("clang diagnostic pop") /} while (0)


#if TARGET_IPHONE_SIMULATOR
#define SIMULATOR 1
#elif TARGET_OS_IPHONE
#define SIMULATOR 0
#endif

#define fourIconHight  108.f
#define cycleHight  182.f
#define kCornerRadius 15.f

///每页请求的数量
#define kPageSize 30

#define kPushNoti  @"push"

#define  KEY_USERNAME_PASSWORD @"com.5dou.app.usernamepassword"
#define  KEY_USERNAME @"com.5dou.app.username"
#define  KEY_PASSWORD @"com.5dou.app.password"

#define kSaveUserInfoKey @"SaveUserInfoXiongAnKey"
#define LaunchKEY  @"firstlaunch"
#define kUserType  @"UserType"
#define kRefreshNotification @"refresh"

#endif /* DEFINE_h */
